import oscP5.*;
import netP5.*;



class ClientOSC
{
  
  OscP5 oscP5;
  NetAddress myRemoteLocation;
  
  String ip = "localhost";
  int port = 3000;

  ClientOSC()
  {
      println("Start Client OSC");
      oscP5 = new OscP5(this,1234);
      myRemoteLocation = new NetAddress(ip,port);
  }
  
  // one message to send
  void send(String msg, float v)
  {
      OscMessage m = new OscMessage(msg);
      m.add(v);
      oscP5.send(m, myRemoteLocation); 
  }
  
  
  
  // group of msg
  void send(String msg, float[] vs)
  {
      OscMessage m = new OscMessage(msg);
      for(int i=0; i<vs.length; i++)
      {
         m.add( vs[i] );
      }
      oscP5.send(m, myRemoteLocation); 
  }
  
  
  
}
